package View.SetupScreens;


import java.awt.BorderLayout;
import java.awt.CardLayout;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

import Model.Game;

import java.awt.Font;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.util.ArrayList;

/**
 * 	@Author Matt Miller
 *	Constructs the difficulty select screen
 *  This screen selects game difficulty, which affects starting resources for each player
 *	Creates a title label and three buttons for the selection of difficulty
 */

public class DifficultySelect extends JPanel {
	

	
	private static final long serialVersionUID = 1L;
	public final Game game;
	public JLabel title;
	public JButton beginner;
	public JButton normal;
	public JButton tournament;
	
	/**
	 * Initializes, constructs, and sets parameters for all
	 * swing components. Includes actionlistener to set difficulty
	 * parameter for game.
	 * @param game - an instance of the main Game. The parameter is "final" so that the inner actionlistener class can access it.
	 */
	
	public DifficultySelect(final Game game) {
		this.game = game;
		
		setBackground(Color.BLACK);
		setLayout(null);
		setPreferredSize(new Dimension(1200, 800));
		
		title = new JLabel("CHOOSE YOUR DIFFICULTY");
		title.setFont(new Font("Helvetica", Font.BOLD, 65));
		title.setForeground(new Color(204, 153, 0));
		title.setSize(900, 100);
		title.setLocation(175, 73);
		
		beginner = new JButton("BEGINNER");

		
		beginner.setFont(new Font("Helvetica", Font.BOLD, 36));
		beginner.setForeground(new Color(204, 153, 0));
		beginner.setSize(592, 100);
		beginner.setLocation(300, 300);
		
		normal = new JButton("NORMAL");

		
		normal.setFont(new Font("Helvetica", Font.BOLD, 36));
		normal.setForeground(new Color(204, 153, 0));
		normal.setSize(592, 100);
		normal.setLocation(300, 450);
		
		tournament = new JButton("TOURNAMENT");

		
		tournament.setFont(new Font("Helvetica", Font.BOLD, 36));
		tournament.setForeground(new Color(204, 153, 0));
		tournament.setSize(592, 100);
		tournament.setLocation(300, 600);
	
		add(normal);
		add(beginner);
		add(tournament);
		add(title);

	}
}
